<template>
  <view class="content">
	  <view class="title">{{item.title}}</view>
	  <view v-html="item.content"></view>

	  </view>
</template>

<script>
//import api from "@/api/protocol";
	import mine from "@/api/mine" 
export default {
  data() {
    return {
      list: [],
	  id:'',
	  item:'',
    };
  },
  onLoad(query) {
	  if (query) {
	  	this.id = query.id
	  }
  },
  onShow() {
    this.getContentList();
  },
  onReady() {},
  methods: {
    // 推荐
    getContentList() {
      mine.getContentList({ type: 6 }).then((res) => {
        if (res.code == 200) {
          this.list = res.rows;
		   this.list.forEach(function(element) {
		  	if (element.id == this.id) {
		  		this.item = element
		  	}
		  }, this);
        }
      });
    },
  },
};
</script>

<style scoped>
.content{
	height: 100vh;
	padding: 32rpx;
	text-align: center;
background: #F7F8FA;
    overflow-y: scroll;
}
.title{
	font-weight: 500;
	font-size: 36rpx;
	color: #333333;
	margin-bottom: 22rpx;
}
</style>
